package com.tencent.sr.iris.basic.mp.restapi.controller.poster;

import com.alibaba.fastjson.JSON;
import com.tencent.sr.iris.basic.mp.service.poster.InvitePosterMpService;
import com.tencent.sr.iris.basic.service.interfaces.request.poster.QueryScenePosterRequest;
import com.tencent.sr.iris.basic.service.interfaces.response.poster.QueryAllSceneResponse;
import com.tencent.sr.iris.basic.service.interfaces.response.poster.QueryScenePosterResponse;
import com.tencent.sr.rmall.common.primitive.HttpResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.List;
import javax.annotation.Resource;
import javax.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@Api(tags = "邀请海报", value = "邀请海报相关接口")
@RestController
@RequestMapping("/iris/basic/mp/v1/invitePoster")
public class InvitePosterMpController {

    @Resource
    private InvitePosterMpService invitePosterMpService;

    @PostMapping("/queryAllSceneList")
    @ApiOperation("查询场景列表")
    public HttpResult<List<QueryAllSceneResponse>> queryAllSceneList() {
        return invitePosterMpService.queryAllSceneList();
    }

    @PostMapping("/queryScenePosterList")
    @ApiOperation("查询场景海报列表")
    public HttpResult<List<QueryScenePosterResponse>> queryScenePosterList(
            @Valid @RequestBody QueryScenePosterRequest request) {
        log.info("queryScenePosterList request:{}", JSON.toJSONString(request));
        return invitePosterMpService.queryScenePosterList(request);
    }
}
